programming4us
           
 
 
SQL Server

SQL Azure : Creating Databases, Logins, and Users (part 2)

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
12/18/2010 9:16:12 AM

2. Logins and Users

Now that you've created a database, you need to grant access to other users. This section discusses creating logins and users, and allowing others to access the SQL Azure environment. Creating logins and users is similar to doing so locally; but as you found out when creating databases, there are T-SQL limitations.

When granting access to another user, you must first create the login for that user. Then, you create the user based on that login. A login is used for authentication; a user account is used for database access and permission validation.

2.1. Logins

When creating logins and users, you must be connected to the master database. You then can use the CREATE LOGIN command as follows:

CREATE LOGIN loginname WITH PASSWORD = 'password'

You must use the WITH PASSWORD option and specify a password. Several options you may be used to from using SQL Server locally aren't support in SQL Azure, such as DEFAULT_DATABASE and DEFAULT_LANGUAGE.

2.2. Users

Now that you've created a login, let's create a user based on it. This is also simple. The syntax is nearly equivalent to the local syntax:

CREATE USER username

This syntax works if there is a login with the same name. For example, the following is valid:

CREATE LOGIN myuser WITH PASSWORD = 'T3stPwd001'
CREATE USER myuser

However, the following fails:

CREATE LOGIN myuser WITH PASSWORD = 'T3stPwd001'
CREATE USER myotheruser

You must use the FROM LOGIN clause when creating a user whose username differs from that of the login name:

CREATE USER username FROM LOGIN loginname

Thus, the correct syntax is the following:

CREATE LOGIN myuser WITH PASSWORD = 'T3stPwd001'
CREATE USER myotheruser FROM LOGIN myuser

NOTE

SQL Azure doesn't support GUEST accounts. When you create a user, it must be based on an existing login.

OK, enough about creating databases, users, and logins. 

Other -----------------
- SQL Azure : Azure Server Administration (part 3) - Databases
- SQL Azure : Azure Server Administration (part 2) - Firewall Settings
- SQL Azure : Azure Server Administration (part 1) - Server Information
- SQL Azure : Managing Your Azure Projects
- SQL Azure : Creating Your Azure Account
- An OLAP Requirements Example: CompSales International (part 16) - Security and Roles
- An OLAP Requirements Example: CompSales International (part 15) - SSIS
- An OLAP Requirements Example: CompSales International (part 14) - Data Mining
- An OLAP Requirements Example: CompSales International (part 13) - Cube Perspectives
- An OLAP Requirements Example: CompSales International (part 12) - Generating a Relational Database
- An OLAP Requirements Example: CompSales International (part 11)
- An OLAP Requirements Example: CompSales International (part 10)
- An OLAP Requirements Example: CompSales International (part 9) - Browsing Data in the Cube
- An OLAP Requirements Example: CompSales International (part 8) - Aggregating Data Within the Cube
- An OLAP Requirements Example: CompSales International (part 7) - Building and Deploying the Cube
- An OLAP Requirements Example: CompSales International (part 6) - Creating the Cube
- An OLAP Requirements Example: CompSales International (part 5) - Creating the Other Dimensions
- An OLAP Requirements Example: CompSales International (part 4) - Defining Dimensions and Hierarchies
- An OLAP Requirements Example: CompSales International (part 3) - Creating Data Source Views
- An OLAP Requirements Example: CompSales International (part 2) - Adding a Data Source
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us